Repository navigation
Add SUPER+A universal select all keybinding - #9921
AlanRoman117 wants to merge 3 commits into
Conversation
Copy, paste, and cut all have SUPER shortcuts, but select all still required CTRL+A. Add it alongside them, skipping terminal windows since CTRL+A there is readline's "move to start of line" rather than select-all. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012FgNnd3XE7c2jL478nscw6
|
Strongly disagree about the no-op. To stay consistent, this shortcut should absolutely make it universal and send Ctrl+shift+a to terminals. |
|
Sounds good, let me update the PR. I also didn't want to get into how some folks may prefer their CLI, however it could indeed improve the experience. Please let me know if this is good and I'll proceed accordingly. |
Per review feedback: instead of a no-op in terminal windows, forward CTRL+SHIFT+A there so the shortcut works everywhere, matching how SUPER+C/V already special-case terminal key combos rather than skipping terminals outright. Reuses the existing universal_clipboard_shortcut helper. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UByBunyAcPCN8Wyo2fwXpM
|
Updated — SUPER+A now forwards CTRL+SHIFT+A in terminals instead of no-op'ing, using the existing o.bind("SUPER + A", "Universal select all", universal_clipboard_shortcut("CTRL", "A", "CTRL SHIFT", "A"))
🤖 Generated with Claude Code |
|
I may have spoken too soon. It appears only Ghostty supports a "select all" action 😬 |
Per review feedback: foot, kitty, and Alacritty have no keyboard- triggerable select-all action to forward to. Verified directly by sending CTRL+SHIFT+A into each terminal's pty and inspecting the raw bytes received: - foot and Alacritty both collapse CTRL+SHIFT+A to the same byte as plain CTRL+A (0x01), so forwarding it would reintroduce the exact bug this binding is meant to fix - it silently runs readline's "move to start of line" instead of doing nothing. - kitty sends a distinct but unbound CSI-u sequence, which readline ignores (a harmless no-op, but still not select-all). - Ghostty is the only one of the four that ships a real select_all action, bound to CTRL+SHIFT+A by default (`ghostty +list-keybinds --default`), and consumes the chord itself before it reaches the shell. So SUPER+A now checks for Ghostty specifically (window.class == "com.mitchellh.ghostty", matching the regex already used to tag terminals in default/hypr/apps/terminals.lua) and forwards CTRL+SHIFT+A only there; other terminals get a no-op. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0117QTgSe8i9Sp8gry3KzW27
|
You're right, and it's actually worse than a missing feature — I installed all four terminals and tested what CTRL+SHIFT+A actually does in each by capturing the raw bytes their pty receives:
Also confirmed via each terminal's own action/keybind listing that foot, kitty, and Alacritty have no bindable "select all" action at all (only mouse-driven selection primitives like So I've updated the binding to check specifically for Ghostty (
🤖 Generated with Claude Code |
|
Heads up: |
|
sounds good, I'll close this PR, thank you all! |
Summary
SUPER + A→ "Universal select all" indefault/hypr/bindings/clipboard.lua, forwarding CTRL+A to the focused window using the samesend_key_statedown/up pattern as the existing clipboard bindings.active_window_is_terminalcheck) since CTRL+A there is readline's "move to start of line", not select-all — forwarding it would silently move the cursor instead.Test plan
./test/allpassesSUPER + Aselects all text in GUI apps (browser, text editor), and is a no-op in terminal windows (leaves CTRL+A's normal readline behavior untouched)omarchy menu keybindings --printshowsSUPER + A → Universal select all🤖 Generated with Claude Code
https://claude.ai/code/session_012FgNnd3XE7c2jL478nscw6